# Copyright (c) 2018 Presto Labs Pte. Ltd.
# Author: xguo

import json
import logging
import os

from coin2.support.product_info.spot_korbit_v1 import convert_coin1_constants


pi_file = 'data/coin2/product_info/Spot.Korbit.v1.json'
with open(pi_file) as f:
  static_constants = convert_coin1_constants(json.load(f)['product_infos'])

dynamic_constants = {}
if int(os.getenv('USE_DYNAMIC_SYMBOL', 0)):
  try:
    from coin2.support.product_info.spot_korbit_v1 import gen_coin1_constants
    dynamic_constants = gen_coin1_constants()
  except Exception as e:
    logging.error('Failed to use korbit dynamic symbols! %s', e)

base_currency_list = list(set(
    static_constants.get('base_currency_list', []) +
    dynamic_constants.get('base_currency_list', [])))
quote_currency_list = ['KRW']
currency_list = base_currency_list + quote_currency_list

min_order_qty = 0.0001
